/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_PROTECTIONCPTA")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FProtectioncpta.findAll", query = "SELECT f FROM FProtectioncpta f"),
    @NamedQuery(name = "FProtectioncpta.findByPROTUser", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTUser = :pROTUser"),
    @NamedQuery(name = "FProtectioncpta.findByPROTPwd", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTPwd = :pROTPwd"),
    @NamedQuery(name = "FProtectioncpta.findByPROTDescription", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTDescription = :pROTDescription"),
    @NamedQuery(name = "FProtectioncpta.findByPROTRight", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTRight = :pROTRight"),
    @NamedQuery(name = "FProtectioncpta.findByPROTNo", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTNo = :pROTNo"),
    @NamedQuery(name = "FProtectioncpta.findByPROTEMail", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTEMail = :pROTEMail"),
    @NamedQuery(name = "FProtectioncpta.findByPROTUserProfil", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTUserProfil = :pROTUserProfil"),
    @NamedQuery(name = "FProtectioncpta.findByPROTAdministrator", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTAdministrator = :pROTAdministrator"),
    @NamedQuery(name = "FProtectioncpta.findByPROTDatePwd", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTDatePwd = :pROTDatePwd"),
    @NamedQuery(name = "FProtectioncpta.findByPROTDateCreate", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTDateCreate = :pROTDateCreate"),
    @NamedQuery(name = "FProtectioncpta.findByPROTLastLoginDate", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTLastLoginDate = :pROTLastLoginDate"),
    @NamedQuery(name = "FProtectioncpta.findByPROTLastLoginTime", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTLastLoginTime = :pROTLastLoginTime"),
    @NamedQuery(name = "FProtectioncpta.findByPROTPwdStatus", query = "SELECT f FROM FProtectioncpta f WHERE f.pROTPwdStatus = :pROTPwdStatus"),
    @NamedQuery(name = "FProtectioncpta.findByCbProt", query = "SELECT f FROM FProtectioncpta f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FProtectioncpta.findByCbMarq", query = "SELECT f FROM FProtectioncpta f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FProtectioncpta.findByCbCreateur", query = "SELECT f FROM FProtectioncpta f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FProtectioncpta.findByCbModification", query = "SELECT f FROM FProtectioncpta f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FProtectioncpta.findByCbReplication", query = "SELECT f FROM FProtectioncpta f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FProtectioncpta.findByCbFlag", query = "SELECT f FROM FProtectioncpta f WHERE f.cbFlag = :cbFlag")})
public class FProtectioncpta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "PROT_User")
    private String pROTUser;
    @Lob
    @Column(name = "cbCIPROT_User")
    private byte[] cbCIPROTUser;
    @Column(name = "PROT_Pwd")
    private String pROTPwd;
    @Column(name = "PROT_Description")
    private String pROTDescription;
    @Column(name = "PROT_Right")
    private Short pROTRight;
    @Column(name = "PROT_No")
    private Integer pROTNo;
    @Column(name = "PROT_EMail")
    private String pROTEMail;
    @Column(name = "PROT_UserProfil")
    private Integer pROTUserProfil;
    @Column(name = "PROT_Administrator")
    private Short pROTAdministrator;
    @Column(name = "PROT_DatePwd")
    @Temporal(TemporalType.TIMESTAMP)
    private Date pROTDatePwd;
    @Column(name = "PROT_DateCreate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date pROTDateCreate;
    @Column(name = "PROT_LastLoginDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date pROTLastLoginDate;
    @Column(name = "PROT_LastLoginTime")
    private String pROTLastLoginTime;
    @Column(name = "PROT_PwdStatus")
    private Short pROTPwdStatus;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @OneToMany(mappedBy = "cbPROTUserProfil")
    private Collection<FProtectioncpta> fProtectioncptaCollection;
    @JoinColumn(name = "cbPROT_UserProfil", referencedColumnName = "PROT_No")
    @ManyToOne
    private FProtectioncpta cbPROTUserProfil;
    @OneToMany(mappedBy = "cbPROTNo")
    private Collection<FCollaborateur> fCollaborateurCollection;

    public FProtectioncpta() {
    }

    public FProtectioncpta(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public FProtectioncpta(Integer cbMarq, String pROTUser) {
        this.cbMarq = cbMarq;
        this.pROTUser = pROTUser;
    }

    public String getPROTUser() {
        return pROTUser;
    }

    public void setPROTUser(String pROTUser) {
        this.pROTUser = pROTUser;
    }

    public byte[] getCbCIPROTUser() {
        return cbCIPROTUser;
    }

    public void setCbCIPROTUser(byte[] cbCIPROTUser) {
        this.cbCIPROTUser = cbCIPROTUser;
    }

    public String getPROTPwd() {
        return pROTPwd;
    }

    public void setPROTPwd(String pROTPwd) {
        this.pROTPwd = pROTPwd;
    }

    public String getPROTDescription() {
        return pROTDescription;
    }

    public void setPROTDescription(String pROTDescription) {
        this.pROTDescription = pROTDescription;
    }

    public Short getPROTRight() {
        return pROTRight;
    }

    public void setPROTRight(Short pROTRight) {
        this.pROTRight = pROTRight;
    }

    public Integer getPROTNo() {
        return pROTNo;
    }

    public void setPROTNo(Integer pROTNo) {
        this.pROTNo = pROTNo;
    }

    public String getPROTEMail() {
        return pROTEMail;
    }

    public void setPROTEMail(String pROTEMail) {
        this.pROTEMail = pROTEMail;
    }

    public Integer getPROTUserProfil() {
        return pROTUserProfil;
    }

    public void setPROTUserProfil(Integer pROTUserProfil) {
        this.pROTUserProfil = pROTUserProfil;
    }

    public Short getPROTAdministrator() {
        return pROTAdministrator;
    }

    public void setPROTAdministrator(Short pROTAdministrator) {
        this.pROTAdministrator = pROTAdministrator;
    }

    public Date getPROTDatePwd() {
        return pROTDatePwd;
    }

    public void setPROTDatePwd(Date pROTDatePwd) {
        this.pROTDatePwd = pROTDatePwd;
    }

    public Date getPROTDateCreate() {
        return pROTDateCreate;
    }

    public void setPROTDateCreate(Date pROTDateCreate) {
        this.pROTDateCreate = pROTDateCreate;
    }

    public Date getPROTLastLoginDate() {
        return pROTLastLoginDate;
    }

    public void setPROTLastLoginDate(Date pROTLastLoginDate) {
        this.pROTLastLoginDate = pROTLastLoginDate;
    }

    public String getPROTLastLoginTime() {
        return pROTLastLoginTime;
    }

    public void setPROTLastLoginTime(String pROTLastLoginTime) {
        this.pROTLastLoginTime = pROTLastLoginTime;
    }

    public Short getPROTPwdStatus() {
        return pROTPwdStatus;
    }

    public void setPROTPwdStatus(Short pROTPwdStatus) {
        this.pROTPwdStatus = pROTPwdStatus;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    @XmlTransient
    public Collection<FProtectioncpta> getFProtectioncptaCollection() {
        return fProtectioncptaCollection;
    }

    public void setFProtectioncptaCollection(Collection<FProtectioncpta> fProtectioncptaCollection) {
        this.fProtectioncptaCollection = fProtectioncptaCollection;
    }

    public FProtectioncpta getCbPROTUserProfil() {
        return cbPROTUserProfil;
    }

    public void setCbPROTUserProfil(FProtectioncpta cbPROTUserProfil) {
        this.cbPROTUserProfil = cbPROTUserProfil;
    }

    @XmlTransient
    public Collection<FCollaborateur> getFCollaborateurCollection() {
        return fCollaborateurCollection;
    }

    public void setFCollaborateurCollection(Collection<FCollaborateur> fCollaborateurCollection) {
        this.fCollaborateurCollection = fCollaborateurCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FProtectioncpta)) {
            return false;
        }
        FProtectioncpta other = (FProtectioncpta) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FProtectioncpta[ cbMarq=" + cbMarq + " ]";
    }
    
}
